package com.robot.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.robot.dao.dto.CompanyPageDTO;
import com.robot.dao.entity.Company;
import com.robot.dao.vo.UserInfoVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface CompanyMapper  extends BaseMapper<Company> {


    @Select("select * from company where invitation_code = #{invitationCode} and is_delete=1")
    Company selectByInvitationCode(String invitationCode);

    @Select("select * from company where company_code = #{companyCode} and is_delete=1")
    Company selectByCode(String companyCode);

    void insertCompany(Company company);


    List<UserInfoVO> pageCompanyUserList(CompanyPageDTO companyDTO);





}